package com.mce.nebula.entity;

import com.mce.nebula.common.BaseEntity;
import jakarta.persistence.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 租户实体，对应Python的Tenants模型
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Entity
@Table(name = "tenant_info")
public class Tenant extends BaseEntity {
    
    @Column(name = "tenant_id", length = 33, unique = true, nullable = false)
    private String tenantId;
    
    @Column(name = "tenant_name", length = 64, unique = true, nullable = false)
    private String tenantName;
    
    @Column(name = "is_active", nullable = false)
    private Boolean isActive = true;
    
    @Column(name = "creater", nullable = false)
    private Integer creater = 0;
    
    @Column(name = "limit_memory", nullable = false)
    private Integer limitMemory = 1024;
    
    @Column(name = "tenant_alias", length = 64)
    private String tenantAlias;
    
    @Column(name = "enterprise_id", length = 32)
    private String enterpriseId;
    
    @Column(name = "namespace", length = 33, unique = true, nullable = false)
    private String namespace;
    
    @Column(name = "logo", length = 2048)
    private String logo;
    
    @Override
    public String toString() {
        return this.tenantName;
    }
}





